package mycoffee.order.model;

public class OrdersDetail extends Root {
	private static final long serialVersionUID = 1L;
	private Food mFood;
	private int mAmount;
	private String mStart;
	private String mEnd;
	private String mNote;
	private double mNotePrice;
	private int mNoteAmount;
	private int mCategoryID;
	private int mSubcategoryID;
	private int mOrdersID;

	/**
	 * Constructor with no input parameter
	 */
	public OrdersDetail() {
	}

	/**
	 * 
	 * @param ordersDetail
	 */
	public OrdersDetail(OrdersDetail ordersDetail) {
		this.mFood = new Food(ordersDetail.getFood());
		this.mAmount = ordersDetail.getAmount();
		this.mStart = ordersDetail.getStart();
		this.mEnd = ordersDetail.getEnd();
		this.mNote = ordersDetail.getNote();
		this.mNotePrice = ordersDetail.getNotePrice();
		this.mNoteAmount = ordersDetail.getNoteAmount();
		this.mCategoryID = ordersDetail.getCategoryID();
		this.mSubcategoryID = ordersDetail.getSubcategoryID();
		this.mOrdersID = ordersDetail.getOrderID();
	}

	public int getAmount() {
		return mAmount;
	}

	/**
	 * @return the food
	 */
	public Food getFood() {
		return mFood;
	}

	/**
	 * @param food
	 *            the food to set
	 */
	public void setFood(Food food) {
		mFood = food;
	}

	public void setAmount(int amount) {
		mAmount = amount;
	}

	public String getStart() {
		return mStart;
	}

	public void setStart(String start) {
		mStart = start;
	}

	public String getEnd() {
		return mEnd;
	}

	public void setEnd(String end) {
		mEnd = end;
	}

	public String getNote() {
		return mNote;
	}

	public void setNote(String note) {
		mNote = note;
	}

	public double getNotePrice() {
		return mNotePrice;
	}

	public void setNotePrice(double notePrice) {
		mNotePrice = notePrice;
	}

	public int getNoteAmount() {
		return mNoteAmount;
	}

	public void setNoteAmount(int noteAmount) {
		mNoteAmount = noteAmount;
	}

	public int getCategoryID() {
		return mCategoryID;
	}

	public void setCategoryID(int categoryID) {
		mCategoryID = categoryID;
	}

	public int getSubcategoryID() {
		return mSubcategoryID;
	}

	public void setSubcategoryID(int subcategoryID) {
		mSubcategoryID = subcategoryID;
	}

	public int getFoodID() {
		if (mFood == null) {
			return Constants.INVALID_VALUE;
		}
		return mFood.getId();
	}

	public int getOrderID() {
		return mOrdersID;
	}

	public void setOrdersID(int ordersID) {
		mOrdersID = ordersID;
	}

}
